package com.ruoyi.service.jpjs.humanresources.impl;


import com.ruoyi.mapper.jpjs.grossprofit.GrossProfitMapper;
import com.ruoyi.mapper.jpjs.humanresources.HumanResourcesMapper;
import com.ruoyi.service.jpjs.PublicService;
import com.ruoyi.service.jpjs.grossprofit.GrossProfitService;
import com.ruoyi.service.jpjs.humanresources.HumanResourcesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class HumanResourcesServiceimpl implements HumanResourcesService {


    @Autowired
    HumanResourcesMapper humanResourcesMapper;

    @Autowired
    PublicService publicService;

    @Override
    public List<Map<String, Object>> list(Map map) {
        List<Map<String, Object>> compList = publicService.findUserCompAndJszb();
        map.put("compList", compList);
        return humanResourcesMapper.list(map);
    }

    @Override
    public Map<String, Object> findDataById(String id) {
        return humanResourcesMapper.findDataById(id);
    }

    @Override
    public int edit(Map map) {
        return humanResourcesMapper.edit(map);
    }

    @Override
    public int getTotalExpenditure(String oid) {
        return humanResourcesMapper.getTotalExpenditure(oid);
    }
}
